package com.job.Gai_Yian.Homework0715;

import java.util.Arrays;

/**
 * @author Gai_Yian
 * @version 1.0
 * @since 2022-07-15 16:01:11
 */
public class String04 {
    public static void main(String[] args) {
        String name="lucy_lili_luck";
        String newname=name.replace('1','L');
        System.out.println(newname);

        String newname2=name.replace("li","WE");
        System.out.println(newname2);

        String[] names=name.split("_");
        System.out.println(Arrays.toString(names));

        String[] names2=name.split("_",2);
        System.out.println(Arrays.toString(names2));
    }
}
